class Solution {
public:
    int twoEggDrop(int n)
    {
        int ans = 0;
        int div = 1;
        while (n >= 1)
        {
            ans++;
            n -= div++;
        }
        return ans;
    }
};